<template>
  <div type="primary" v-loading.fullscreen.lock="fullscreenLoading">
  </div>
</template>

<script>
  import {
    redirectSource
  } from '@/api/redirect'
  import {
    getUrlParam
  } from '@/utils/common'
  export default {
    data() {
      return {
        fullscreenLoading: false
      }
    },
    mounted() {
      this.openFullScreen();
    },
    methods: {

      async openFullScreen() {
        this.fullscreenLoading = true;
        var code = getUrlParam("code");
        var codeId = getUrlParam("state");
        var params = {
          code: code,
          codeId: codeId
        }
        var res = await redirectSource(params);
        console.log("res:",res)
        location.href = res.data.url;
        setTimeout(() => {
          this.fullscreenLoading = false;
        }, 5000);
      },
    }
  }
</script>
